package com.sy.service.Impl;

import com.sy.entity.UserRole;
import com.sy.repository.UserRoleRepository;
import com.sy.service.UserRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author zbbstart
 * @date 2021/2/2 - 18:39
 */
@Service
public class UserRoleServiceImpl implements UserRoleService {
    @Autowired
    private UserRoleRepository userRoleRepository;
    @Override
    public void insertUserRole(UserRole userRole) {
        userRoleRepository.save(userRole);
    }

    @Override
    public void deleteUserRole(Integer userId) {
        userRoleRepository.existsById(userId);
    }
}
